package com.kk.facade;

/**
 * @author 王志强
 * @date 2022-01-05
 */
public class CinemaFacade {

    private DVDPlayer dvdPlayer;
    private Popcorn popcorn;
    private Screne screne;
    private TheaterLight theaterLight;

    public CinemaFacade() {
        dvdPlayer = DVDPlayer.getInstance();
        popcorn = Popcorn.getInstance();
        screne = Screne.getInstance();
        theaterLight = TheaterLight.getInstance();
    }

    public void ready() {
        dvdPlayer.on();
        screne.on();
        popcorn.on();
        theaterLight.on();
    }

    public void play() {
        dvdPlayer.vUp();
        dvdPlayer.play();
    }

    public void powerOff() {
        dvdPlayer.off();
        screne.off();
        popcorn.off();
        theaterLight.off();
    }
}
